from django.db import models

# Create your models here.
class HistoryTalkModel(models.Model):
    created_at = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
    content = models.TextField(verbose_name='对话内容')
    user = models.ForeignKey('login.UserModel', on_delete=models.CASCADE, verbose_name='用户')
    type =models.CharField(max_length=100, verbose_name='对话类型')
    def __str__(self):
        return self.content
    class Meta:
        db_table='history_talk'

class HetongModel(models.Model):
    contract_id=models.CharField(max_length=100,verbose_name='合同编号')
    review_result=models.TextField(verbose_name='合同内容')
    user=models.ForeignKey('login.UserModel',on_delete=models.CASCADE,verbose_name='用户')
    created_at=models.DateTimeField(auto_now_add=True,verbose_name='创建时间')
    def __str__(self):
        return self.user
    class Meta:
        db_table='hetong'
